<?php

namespace app\common\model;

use think\Exception as ThinkException;

class Exception extends ThinkException
{
    private $statusCode;
    private $headers;

    public function __construct($message = null, $statusCode = 0, array $headers = [], $code = 0)
    {
        $this->statusCode = $statusCode;
        $this->headers    = $headers;

        parent::__construct($message, $code);
    }

    public function getStatusCode()
    {
        return $this->statusCode;
    }

    public function getHeaders()
    {
        return $this->headers;
    }
}
